package cn.edu.hbwe.book.admin.service.order;

import java.sql.SQLException;
import java.util.List;

import cn.edu.hbwe.book.admin.dao.OrderDao;
import cn.edu.hbwe.book.entity.Orders;

public class OrdersService {

	private OrderDao odao = new OrderDao();

	// 查找所有订单
	public List<Orders> findAllOrder() {
		List<Orders> orders = null;
		try {
			// 查找出订单信息
			orders = odao.findAllOrder();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return orders;
	}

	// 多条件查询订单信息
	public List<Orders> findOrderCondition(String id, String receieverName) {
		List<Orders> orders = null;
		try {
			orders = odao.findOrderCondition(id, receieverName);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return orders;
	}

}
